#@layout()

#define script()
<script>

    function doDel(id) {
        ajaxGet("/admin/servicebulletins/jpress_addon_servicebulletins/doDel/" + id);
    }

    $("#batchDel").click(function () {
        var ids = getSelectedIds();
        if (ids == "") {
            alert('您未选择任何条目');
            return
        }
        ajaxGet("/admin/servicebulletins/jpress_addon_servicebulletins/doDelByIds?ids=" + ids);
    })

    function reset(){
        window.location.href = window.location.pathname;
    }
</script>
#end

#define content()
<div class="content-wrapper">

    <section class="content-header">
        <h1>
            管理
            <small>Items</small>
        </h1>
    </section>

    <section class="content">

        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">

                    <form class="form-horizontal actionPanel" method="get">
                        <input type="hidden" name="status" value="#para('status')">
                        <div class="row">
                            <div class="form-group col-lg-4">
                                <label class="col-sm-3 control-label">通告编号</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" name="circular_number" value="#para('circular_number')">
                                </div>
                            </div>
                            <div class="form-group col-lg-4">
                                <label class="col-sm-3 control-label">版次</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" name="edition" value="#para('edition')">
                                </div>
                            </div>
                            <div class="form-group col-lg-4">
                                <label class="col-sm-3 control-label">标题</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" name="title" value="#para('title')">
                                </div>
                            </div>
                            <div class="form-group col-lg-4">
                                <label class="col-sm-3 control-label">颁发单位</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" name="lssuing_unit" value="#para('lssuing_unit')">
                                </div>
                            </div>
                            <div class="form-group col-lg-4">
                                <div class="col-sm-12">
                                    <button type="submit" class="btn btn-primary ">查询</button>
                                    <a href="javascript:reset();"><button type="button" class="btn btn-default">刷新</button></a>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-body -->
                    </form>
                    <div class="box-header with-border">

                        <div class="row actionPanel">
                            <div class="col-xs-12">
                                <a href="jpress_addon_servicebulletins/edit" class="btn btn-primary ">
                                    <i class="fa fa-fw fa-plus"></i> 新建
                                </a>
                                <button type="submit" id="batchDel" class="btn btn-default checkAction"> 批量删除</button>
                            </div>
                        </div>

                    </div>
                    <!-- /.box-header -->
                    <div class="box-body ">

                        <table class="table table-striped">
                            <tbody>
                            <tr>
                                <th style="width: 10px">
	                                    <input name="dataItem" onchange="checkAll(this)" type="checkbox"/>
	                                </th>
	                                <th>id</th>
	                                <th>通告编号</th>
	                                <th>版次</th>
	                                <th>标题</th>
	                                <!--<th>英文标题</th>-->
	                                <th>颁发单位</th>
	                                <th>发布日期</th>
	                                <th>机型</th>

                            </tr>
                            #for(entry : page.list)
                            <tr class="jp-actiontr">
                                <td><input class="dataItem" type="checkbox" value="#(entry.id)" />
                                </td>
                                <td>
                                    <strong>
                                        <a href="#(CPATH)/admin/servicebulletins/jpress_addon_servicebulletins/edit/#(entry.id)"> #(entry.id ??) </a>
                                    </strong>
                                    <div class="jp-actionblock">
                                        <div class="jp-actionitem">
                                            <a href="/admin/servicebulletins/jpress_addon_servicebulletins/edit/#(entry.id)">编辑</a> |
                                            <a href="javascript:;" class="red-action"
                                               onclick="doDel('#(entry.id)')">删除</a>
                                        </div>
                                    </div>
                                </td>

	                                <td>#(entry.circular_number)</td>
	                                <td>#(entry.edition)</td>
	                                <td>#(entry.title)</td>
	                                #--<td>#(entry.title_en)</td>--#
	                                <td>#(entry.lssuing_unit)</td>
	                                <td>#(entry.release_date)</td>
	                                <td>#(entry.model)</td>
                            </tr>
                            #end
                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <div class="row">
                            <div class="col-sm-12">
                            	 #@_paginate()
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box -->
            </div>
        </div>

    </section>
</div>
#end
